<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/add_customer.css"/>
    <title>新增客户</title>
</head>
<body>
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 20px 0 213px;">
            <p class="brand">
                <a>客户</a>><a href="${pageContext.request.contextPath}/customer/listCustomer">客户查询</a>><a class="now">新增客户</a>
            </p>
            <div class="content-container" >
                <div class="message-form">
                    <form action="${pageContext.request.contextPath}/customer/insertCustomer" method="post" id="myForm" onsubmit="return vailAll()">
                        <h4>基础资料</h4>
                        <div class="basic clearfix">
                            <div class="left-block fl clearfix">
                                <div class="account-number">
                                    <span><b>*</b>登录账号</span>
                                    <input name="customerId" class="long" type="text" style="display: none;"/>
                                    <input name="loginAccount" id="loginAccount"  onblur="getCustomer(this)" class="long" type="text" placeholder="请输入客户登录账号" />
                                    <p class="error hide"></p>
                                </div>
                                <div class="customer-name">
                                    <span><b>*</b>客户名称</span>
                                    <input id="customerName" value="${customer.name}" name="customerName" class="long" type="text" placeholder="请输入客户名称"/>
                                    <p class="error hide"></p>
                                </div>
                                <div class="address clearfix">
                                    <span class="fl"><b>*</b>联系地址</span>
                                    <div class="select-box clearfix fl chose-address">
                                        <div class="fl province">
                                            <span>▼</span>
                                            <input id="province" name="province" type="text" readonly class="short" placeholder="请选择省份"/>
                                            <ul class="hide">
                                                <li>陕西</li>
                                                <li>江苏</li>
                                                <li>浙江</li>
                                            </ul>
                                        </div>
                                        <div class="fl city">
                                            <span>▼</span>
                                            <input id="city" name="city" type="text" readonly class="short" placeholder="请选择城市"/>
                                            <ul class="hide">
                                                <li>西安</li>
                                                <li>汉中</li>
                                                <li>商洛</li>
                                                <li>渭南</li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <p class="error hide" style="margin-top: -15px;margin-bottom: 10px"></p>
                                <div class="address-detail">
                                    <input name="address"  id="address-detail" class="long" type="text" placeholder="请输入详细地址"/>
                                </div>
                                <div class="remarks">
                                    <span>备注</span>
                                    <textarea name="remark" cols="30" rows="10"></textarea>
                                </div>
                            </div>
                            <div class="right-block fl clearfix">
                                <div class="account-status">
                                    <span><b>*</b>账号状态</span>
                                    <label for="true" class="status">
                                        <input type="radio" name="isUse" id="true" value="1"/>
                                        开启
                                    </label>
                                    <label for="false" class="status">
                                        <input type="radio"  name="isUse" id="false" value="0"/>
                                        禁止
                                    </label>
                                    <p class="error hide" style="margin-left: 17%;"></p>
                                </div>
                                <div class="customer-number">
                                    <span><b>*</b>客户编号</span>
                                    <input class="long" name="code" id="customerNumber" type="text" placeholder="请输入客户编号"/>
                                    <p class="error hide" style="margin-left: 17%;"></p>
                                </div>
                                <div class="customer-type clearfix select-box">
                                    <span class="fl"><b>*</b>客户类型</span>
                                    <div class="fl">
                                        <span>▼</span>
                                        <input type="text" readonly class="short show" placeholder="请选择客户类型" />
                                        <input type="text" readonly class="short"  id="customerType" name="customerTypeId" style="display: none;"/>
                                        <ul class="hide">
                                        	<c:forEach var="customerType" items="${allCustomerType}">
                                        	 <li data-id="${customerType.id }">${customerType.type }</li>
                                        	</c:forEach>
                                        </ul>
                                    </div>
                                </div>
                                <p class="error hide" style="margin-left: 17%;margin-top: -15px;margin-bottom: 10px"></p>
                                <div class="content-msg clearfix">
                                    <div class="content-name">
                                        <span><b>*</b>联系人</span>
                                        <input class="short" id="contentName"  type="text" name="contact" placeholder="请输入联系人"/>
                                        <p class="error hide" style="margin-left: 34%;"></p>
                                    </div>
                                    <div class="content-phone">
                                        <span><b>*</b>手机</span>
                                        <input class="short" id="contentPhone"  type="text" name="tel" placeholder="请输入联系人电话号码"/>
                                        <p class="error hide" style="margin-left: 34%;"></p>
                                    </div>
                                </div>
                                <div class="content-msg clearfix">
                                    <div class="content-name">
                                        <span>电子邮箱</span>
                                        <input class="short" id="contentMsg" type="text" name="email" placeholder="请输入电子邮箱"/>
                                        <p class="error hide" style="margin-left: 34%;"></p>
                                    </div>
                                    <div class="content-phone">
                                        <span>QQ</span>
                                        <input class="short" id="qq" type="text" name="qq" placeholder="请输入QQ号码"/>
                                        <p class="error hide" style="margin-left: 34%;"></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <h4>业务信息</h4>
                        <div class="sales-clerk clearfix select-box">
                            <span class="fl"><b>*</b>所属业务员</span>
                            <div class="fl">
                                <span>▼</span>
                                <input type="text" id="salesMan"  readonly class="long show" placeholder="请选择业务员" />
                                <input type="text" name="distributorUserId" readonly style="display: none;"/>
                                <ul class="hide">
                                    <c:forEach var="distributorUser" items="${allDistributorUser}">
                                     	 <li data-id="${distributorUser.id }">${distributorUser.name }</li>
                                   	</c:forEach>
                                </ul>
                            </div>
                        </div>
                        <p class="error hide" style="margin-top: -15px;margin-bottom: 10px"></p>
                        <div class="payment">
                            <span><b>*</b>付款方式</span>
                            <label for="now" class="pay-way">现付</label>
                            <input type="checkbox" name="settlementType" id="now" value="现付"/>
                            <label for="advance" class="pay-way">预付</label>
                            <input type="checkbox" name="settlementType" id="advance" value="预付"/>
                            <label for="after" class="pay-way">后付</label>
                            <input type="checkbox" name="settlementType" id="after" value="后付"/>
                            <p class="error hide"></p>
                        </div>
                        <h4>财务信息</h4>
                        <div class="left-block fl">
                            <div class="account-number">
                                <span>开户名称</span>
                                <input class="long" name="accountName" type="text" placeholder="请输入开户名称"/>
                        </div>
                            <div class="account-number">
                                <span>开户银行</span>
                                <input class="long" name="bank" type="text" placeholder="请输入开户银行"/>
                            </div>
                            <div class="account-number">
                                <span>纳税人识别号</span>
                                <input class="long" name="taxpayerIdNum" type="text" placeholder="请输入纳税人识别号"/>
                            </div>
                        </div>
                        <div class="right-block fl">
                            <div class="account-number">
                                <span>银行账号</span>
                                <input class="long" name="account" type="text" placeholder="请输入银行账号"/>
                            </div>
                            <div class="account-number">
                                <span>开票抬头</span>
                                <input class="long" name="invoiceTitle" type="text" placeholder="请输入开票抬头"/>
                            </div>
                        </div>
                        <input id="submit-btn" type="submit" style="display: none"/>
                        <input id="reset-btn" type="reset" style="display: none"/>
                    </form>
                </div>
                <div class="fixed-block">
                    <button class="btn-submit" onclick="$('#submit-btn').click()">保存</button>
                    <button class="btn-reset" onclick="$('#reset-btn').click()">取消</button>
                </div>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/add_customer.js"></script>
        <!--内容部分结束-->
    </div>
</div>
</body>
</html>